<?php
namespace app\admin\controller;
use app\admin\controller\Common;

use think\facade\Db;
use think\facade\View;

class Operatelog extends Common{
	public function loglogin(){
		$data=request()->get();
		$whe=array();
        if(!empty($data)){
            if(!empty($data['name'])){
                $whe['admin_name'] =array('like','%'.$data['name'].'%');
            } 
        }
        $list=Db::name('log_login')->where($whe)->order('id desc')->paginate(20);
    
		View::assign("list",$list);
		$number=Db::name('log_login')->where($whe)->count();
		View::assign("number",$number);
		foreach($data as $k => $v) {
            View::assign($k, $v);
        }
		return View::fetch("log_login");
	}
}
